//
//  OneModel.m
//  UI19_豆瓣UICollectionView
//
//  Created by apple on 16/1/29.
//  Copyright © 2016年 King. All rights reserved.
//

#import "OneModel.h"

#import "TwoModel.h"

@implementation OneModel


- (instancetype)initWithDataSource:(NSDictionary *)dataSource
{
    self = [super init];
    if (self) {
        
        [self setValuesForKeysWithDictionary:dataSource];
        
        NSMutableArray *array = [NSMutableArray arrayWithCapacity:0];
        
        for (NSDictionary *dic in self.entries) {
            TwoModel *twoModel = [[TwoModel alloc] init];
            [twoModel setValuesForKeysWithDictionary:dic];
            [array addObject:twoModel];
        }
        
        self.entries = [NSArray arrayWithArray:array];
        
    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}


- (id)valueForUndefinedKey:(NSString *)key {
    return nil;
}


@end
